typedef unsigned char uint8;
typedef unsigned short uint16;
typedef signed char int8;
typedef signed short int16;

#ifndef STATE_MACHINE_STRUCTURE
    #define STATE_MACHINE_STRUCTURE
    typedef struct
    {
        uint8 u8prev2State;
        uint8 u8prevState;
        uint8 u8currentState;
    } stateMachine;
#endif